package 草稿包;

import java.lang.*;
import java.util.*;
public class test4 {
    public static String solve(StringBuilder str){
        int l=0,r=str.length()-1;
        System.out.println(l+" "+r);
        while(l<r){
            System.out.println("l is "+l);
            System.out.println("r is "+r);
            while(l<r&&l<str.length()&&!Character.isAlphabetic(str.charAt(l))){
                l++;
                System.out.println(l);
            }
            while(l<r&&r>=0&&!Character.isAlphabetic(str.charAt(r))){
                r--;
            }
            //交换
            Character tmp=str.charAt(l);
            str.setCharAt(l,str.charAt(r));
            str.setCharAt(r,tmp);
            l++;
            r--;
        }
        return str.toString();
    }
    public static void main(String[] args){
        Scanner in=new Scanner(System.in);
        String str=in.nextLine();
        System.out.println(solve(new StringBuilder(str)));
    }
}